﻿using B.S.Sterilizationcenter.ErrorCode;
using B.S.Sterilizationcenter.Writer.API.Appliaction.Commends.Zyy.Returns;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace B.S.Sterilizationcenter.Writer.API.Controllers.ZYY.Returns
{
    [Route("api/[controller]")]
    [ApiController]
    public class ReturnController : ControllerBase
    {
        private readonly IMediator med;

        public ReturnController(IMediator med)
        {
            this.med = med;
        }
        [HttpPut]
        public async Task<ApiResult<int>> Handle(UpdateReturnCheCommand request, CancellationToken cancellationToken)
        {
            return await  med.Send(request);
        }
    }
}
